import request from '@/utils/request'

export function notificationAdd(obj) {
  return request({
    url: '/api/admin/notification',
    method: 'post',
    data: obj
  })
}

// 查看单个公告
export function lookNotification(id) {
  return request({
    url: '/api/admin/notification/' + id,
    method: 'get'
  })
}

// 保存草稿
export function saveDraft(query) {
  return request({
    url: '/api/admin/notification/saveDraft',
    method: 'post',
    data: query
  })
}

// 发布公告
export function notificationRelease(name) {
  return request({
    url: '/api/admin/notification/release',
    method: 'post',
    data: name
  })
}